<?php

// $Id$


class TCMS_VPT_CI extends Tangra_Class {
	private $id;
	private $template;
	private $ci_type;
	private $ci_name;
	private $required;
	private $export_name;



	public function set_id($id) {
		tangra_if_not_int_throw_e($id);

		$this->id = $id;
	}


	public function get_id() {
		return $this->id;
	}


	public function set_template($template) {
		tangra_if_not_int_throw_e($template);

		$this->template = $template;
	}


	public function get_template() {
		return $this->template;
	}


	public function set_ci_type($ci_type) {
		tangra_if_not_int_throw_e($ci_type);

		$this->ci_type = $ci_type;
	}


	public function get_ci_type() {
		return $this->ci_type;
	}


	public function set_ci_name($ci_name) {
		$this->ci_name = $ci_name;
	}


	public function get_ci_name() {
		return $this->ci_name;
	}


	public function set_required($required) {
		$this->required = $required ? true : false;
	}


	public function get_required() {
		return $this->required;
	}


	public function set_export_name($export_name) {
		if (ereg("[a-z0-9_]{1,255}", $export_name)) {
			$this->export_name = $export_name;
		} else {
			throw Tangra_Module_Exception('Invalid export_name: '.$export_name.'. Must conform ereg("[a-z0-9_]{1,255}").');
		}
	}

	public function get_export_name() {
		return $this->export_name;
	}
}